//
//  BaseWindowVC.swift
//  ZJTools
//
//  Created by 万孟超 on 2023/10/23.
//

import Cocoa

class BaseWindowVC: NSWindowController {
    
    convenience init(size: NSSize = NSMakeSize(1000, 650), viewController: NSViewController) {
        let contentWindow = NSWindow(contentRect: NSRect(origin: .zero, size: size), styleMask: [.titled, .closable, .miniaturizable, .fullSizeContentView], backing: .buffered, defer: false)
        contentWindow.titlebarAppearsTransparent = true
        contentWindow.titleVisibility = .hidden
        contentWindow.isMovableByWindowBackground = true
        contentWindow.center()
        self.init(window: contentWindow)
        contentWindow.contentViewController = viewController
    }

    override func windowDidLoad() {
        super.windowDidLoad()
    
        // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file.
    }

}
